import request, { axios } from '@/utils/request'

export function listUserProject (parameter) {
  return axios({
    url: '/project/listUserProject',
    method: 'post',
    data: parameter
  })
}

export function listAllProject (parameter) {
  return axios({
    url: '/project/listAll',
    method: 'post',
    data: parameter
  })
}

export function addProject (parameter) {
  return axios({
    url: '/project/addProject',
    method: 'post',
    data: parameter
  })
}

export function updateProject (parameter) {
  return axios({
    url: '/project/updateProject',
    method: 'post',
    data: parameter
  })
}

export function deleteProject (parameter) {
  return axios({
    url: '/project/deleteProject',
    method: 'post',
    data: parameter
  })
}

export function update (parameter) {
  return axios({
    url: '/project/update',
    method: 'post',
    data: parameter
  })
}

export function queryUserByProject (parameter) {
  return axios({
    url: '/project/listByProject',
    method: 'post',
    data: parameter
  })
}

export function queryUserAllProject (parameter) {
  return axios({
    url: '/project/queryAllProject',
    method: 'post',
    data: parameter
  })
}

export function removeUserByProject (parameter) {
  return axios({
    url: '/project/removeByProject',
    method: 'post',
    data: parameter
  })
}

export function addUserByProject (parameter) {
  return axios({
    url: '/project/addByProject',
    method: 'post',
    data: parameter
  })
}

export function downExecl (parameter) {
  return request({
    url: '/project/download',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}

export function queryType (parameter) {
  return axios({
    url: '/type/listAll',
    method: 'post',
    data: parameter
  })
}

export function querySubject (parameter) {
  return axios({
    url: '/subject/listAll',
    method: 'post',
    data: parameter
  })
}
